const Controller = require('egg').Controller

class QuoteController extends Controller {
  async getQuote() {
    const {ctx} = this
    let ids = JSON.parse(ctx.request.query[0]) 
    // let ids = ctx.request.query
    console.log(ids)
    let quoteList = await ctx.service.quote.getQuoteList(ids)
    if(quoteList) {
      ctx.body = {
        code: 20000,
        data: quoteList
      }
    }else{
      ctx.body = {
        code: 50000,
        data: "服务器异常"
      }
    }
  }
}
module.exports = QuoteController